<template>
  <div>

      <mh></mh>

    <main class="" id="main-collapse">
      <div>
      
      
        <!--面包屑导航 通过：进行传参操作-->
        <bread :datas='this.datas'></bread>

        <br /><br />
        
        
        <input v-model="mymsg" placeholder="请输入要发送的信息">

        <Button @click="sendmsg">推送消息</Button>

        
      </div>
    
    </main>

  </div>
</template>

 
<script>


import mh from './mh.vue'
//导入面包屑导航组件
import bread from './bread.vue'

export default {
  data () {
    return {
      msg: "这是一个变量",
      //面包屑变量
      datas:[{title:'首页',route:{name:'index'}},{title:'服务端'}],
      //数据
      datalist:[],
      mymsg:''
      
    }
    },
    components: {
        'mh':mh,
        //声明标签
        'bread':bread
    },
    mounted:function(){
       

    },
    methods:{
        sendmsg(){
            this.axios.get('http://localhost:8000/websocket_send/',{params:{mymsg:this.mymsg}}).then((result)=>{
                console.log(result);
            })
        }
    

    
    }
}


</script>
 
<style>



</style>